winbrew_core\fs\archive/
limits.rs

1#[derive(Clone, Copy, Debug)]
2pub(crate) struct ExtractionLimits {
3    pub(crate) max_total_size: u64,
4    pub(crate) max_file_count: usize,
5    pub(crate) max_compression_ratio: u64,
6    pub(crate) max_path_depth: usize,
7}
8
9impl Default for ExtractionLimits {
10    fn default() -> Self {
11        Self {
12            max_total_size: 10 * 1024 * 1024 * 1024,
13            max_file_count: 100_000,
14            max_compression_ratio: 100,
15            max_path_depth: 255,
16        }
17    }
18}